<?php
error_reporting(E_ALL ^ E_NOTICE);

function linkedin_get_skill($skill) {
    $html = file_get_contents('https://www.linkedin.com/ta/skill?query=' . $skill);
    if (empty($html) == TRUE) {
        return FALSE;
    }
    $result_json = json_decode($html, TRUE);
    $skills = $result_json['resultList'];
    $result = array();
    for ($i = 0, $c = count($skills); $i < $c; $i++) {
        $result[] = array(
            'display_name' => $skills[$i]['displayName'],
            'id' => $skills[$i]['id']);
    }
    return $result;
}

function linkedin_get_company($company) {
    echo 'https://www.linkedin.com/ta/company?query=' . $company;
    $html = file_get_contents('https://www.linkedin.com/ta/company?query=' . $company);
    if (empty($html) == TRUE) {
        return FALSE;
    }
    $result_json = json_decode($html, TRUE);
    print_r($result_json);
    $companys = $result_json['resultList'];
    $result = array();
    for ($i = 0, $c = count($companys); $i < $c; $i++) {
        $result[] = array(
            'display_name' => $companys[$i]['displayName'],
            'id' => $companys[$i]['id'],
            'imageUrl' => $companys[$i]['imageUrl'],
            'url' => $companys[$i]['url']);
    }
    return $result;
}

function linkedin_get_school($school) {
    $html = file_get_contents('https://www.linkedin.com/ta/school?query=' . $school);
    if (empty($html) == TRUE) {
        return FALSE;
    }
    $result_json = json_decode($html, TRUE);
    $schools = $result_json['resultList'];
    $result = array();
    for ($i = 0, $c = count($schools); $i < $c; $i++) {
        $result[] = array(
            'display_name' => $schools[$i]['displayName'],
            'id' => $schools[$i]['id'],
            'imageUrl' => $schools[$i]['imageUrl'],
            'url' => $schools[$i]['url']);
    }
    return $result;
}

echo '<pre>';
print_r(linkedin_get_school('a'));

?>